
import request from '@/utils/request.js'
/**
 * @description: 搜索接口
 * @param {*} keyword
 * @return {*}
 */
export const getSuggestion = (keyword) => {
  return request({
    method: 'GET',
    url: '/v1_0/suggestion',
    params: {
      q: keyword
    }
  })
}
/**
 * @description: 获取搜索结果
 * @param {*} q 搜索关键词
 * @param {*} page  页数
 * @return {*}
 */
export const getSearch = (q, page) => {
  return request({
    method: 'GET',
    url: '/v1_0/search',
    params: {
      q,
      page
    }
  })
}
